core-parking: fix build with gcc12 and NR_CPUS=1
authorJan Beulich <jbeulich@suse.com>
Tue, 21 Mar 2023 12:44:53 +0000 (13:44 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 21 Mar 2023 12:44:53 +0000 (13:44 +0100)
commitb5409f4e4d0722e8669123d59f15f784903d153f
treeaeeb4ee84d8105ef406f2cf05d1bfcdd39ffb9df
parentb4dad09bb23c439f2e67ed2eb6d7bdd640b8bbae
core-parking: fix build with gcc12 and NR_CPUS=1

Gcc12 takes issue with core_parking_remove()'s

    for ( ; i < cur_idle_nums; ++i )
        core_parking_cpunum[i] = core_parking_cpunum[i + 1];

complaining that the right hand side array access is past the bounds of
1. Clearly the compiler can't know that cur_idle_nums can only ever be
zero in this case (as the sole CPU cannot be parked).

Arrange for core_parking.c's contents to not be needed altogether, and
then disable its building when NR_CPUS == 1.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: 4b0422f70feb4b1cd04598ffde805fc224f3812e
master date: 2023-03-13 15:15:42 +0100
xen/arch/x86/Kconfig
xen/arch/x86/platform_hypercall.c
xen/arch/x86/sysctl.c
xen/common/Kconfig